package org.jeecg.modules.database.sharding.dict;

public enum OperateTypeEnum {
    /**
     * 查询
     */
    SELECT(1, "查询"),
    /**
     * 添加
     */
    ADD(2, "添加"),
    /**
     * 修改
     */
    UPDATE(3, "修改"),
    /**
     * 删除
     */
    DELETE(4, "删除"),
    /**
     * 导入
     */
    IMPORT(5, "导入"),
    /**
     * 导出
     */
    EXPORT(6, "导出");


    private Integer key;
    private String value;

    OperateTypeEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getDictValue(Integer operateType) {
        for (OperateTypeEnum operateTypeEnum : OperateTypeEnum.values()) {
            if (operateTypeEnum.getKey().equals(operateType)) {
                return operateTypeEnum.getValue();
            }
        }
        return null;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
